<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改员工')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-STAFF-edit" th:object="${sTAFF}">
            <input name="staffId" th:field="*{staffId}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">员工姓名：</label>
                <div class="col-sm-8">
                    <input name="staffName" th:field="*{staffName}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">员工性别：</label>
                <div class="col-sm-8">
                    <select name="staffSex" class="form-control m-b" th:with="type=${@dict.getType('sys_user_sex')}" required>
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{staffSex}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">员工职业：</label>
                <div class="col-sm-8">
                    <input name="staffCareer" th:field="*{staffCareer}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">员工状态：</label>
                <div class="col-sm-8">
                    <input name="staffState" th:field="*{staffState}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">员工身份证号：</label>
                <div class="col-sm-8">
                    <input name="staffIdNumber" th:field="*{staffIdNumber}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">员工手机号：</label>
                <div class="col-sm-8">
                    <input name="staffPhone" th:field="*{staffPhone}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">员工住址：</label>
                <div class="col-sm-8">
                    <input name="staffHome" th:field="*{staffHome}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">员工入职时间：</label>
                <div class="col-sm-8">
                    <input name="staffBeginTime" th:field="*{staffBeginTime}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">员工离职时间：</label>
                <div class="col-sm-8">
                    <input name="staffFinishTime" th:field="*{staffFinishTime}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "system/STAFF";
        $("#form-STAFF-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-STAFF-edit').serialize());
            }
        }
    </script>
</body>
</html>